package com.kashow.bean.live.detail;

import android.text.TextUtils;

import com.kashow.C;
import com.kashow.bean.BaseBean;

import java.util.List;

/**
 * Created by yybs on 16/11/15.
 */

public class LiveDetail extends BaseBean {

    /**
     * isStar : false
     * __v : 0
     * _id : 7
     * category : 1
     * desc : 跨年直播
     * livePic : http://oh2ucnq1s.bkt.clouddn.com/49c3ae5f679a41f3ba566ce541521b76?imageslim
     * liveSharePic : http://oh2ucnq1s.bkt.clouddn.com/49c3ae5f679a41f3ba566ce541521b76?imageslim
     * liveType : 1
     * playUrl : http://pili-live-hls.kashowvr.com/test-kashowvr/3e0f52304ce0441199bf6c3324e787a4.m3u8
     * price : 10.00
     * score : 10
     * startAt : 2016-12-31 00:00:00
     * stream : 3e0f52304ce0441199bf6c3324e787a4
     * teacher : {"follow":false,"follows":1,"followers":0,"_id":5,"__v":0,"nickname":"李文跃","relation":3,"phone":"15822774691","unionid":"ojmTMwFUyD5xpIMUgJE9ZyXRIr8A","wxUserInfo":{"openid":"oYinvs8fuzlFw-lQUaoUQdJdE0so","nickname":"李文跃","sex":1,"language":"zh_CN","city":"Hangzhou","province":"Zhejiang","country":"China","headimgurl":"http://wx.qlogo.cn/mmopen/ajNVdqHZLLCERgmTtkWEbY4Ol1mG46MJTQuVeUN2mCTXnV1CRmjU32ZGFpP8aicrSPh5j7tUmI01frFficha4FjA/0","unionid":"ojmTMwFUyD5xpIMUgJE9ZyXRIr8A","updatedAt":"2016-12-27T08:16:20.000Z","tagid_list":[]},"authInfo":{"intro":"","realName":"李文跃","cardNumber":"371522199008071234","cardPic1":"e_NUyLdkartvCAXwVzVg7fVRodhKGOXCXYEsMYtC1Opo4SAtSdbvQQaOw_XXmW5P","cardPic2":"hXO9UE9NKZApMv8qoRdpyI4ANzZzdQt_vEgs9-ngorBu0zMzpqqOeL2jOQIaOTCE","status":1,"updatedAt":"2016-12-27T08:22:01.842Z","createdAt":"2016-12-27T08:22:01.842Z"},"createdAt":"2016-12-27T08:16:32.122Z","isSub":true,"sex":0,"balance":0,"score":0,"level":1,"isTeacher":true,"stars":0,"grade":-1}
     * title : 跨年直播
     * priority : 1
     * createdAt : 2016-12-28T04:00:29.939Z
     * a_watch : 0
     * a_stream : []
     * watch : 0
     * status : 1
     * imgDescs : [{"desc":"","img":"http://oh2ucnq1s.bkt.clouddn.com/f2635404a8784e60b42cc35f66742b7f?1080_1920"},{"desc":"","img":"http://oh2ucnq1s.bkt.clouddn.com/dbead5e4672e469883e031ccd92bc8cf?1080_1920"},{"desc":"","img":"http://oh2ucnq1s.bkt.clouddn.com/9c0c6d42242944c2bb117a5201eef70a?1080_1920"},{"desc":"","img":"http://oh2ucnq1s.bkt.clouddn.com/962308df205c41b780c33f8bc4d4c156?1080_1920"},{"desc":"","img":"http://oh2ucnq1s.bkt.clouddn.com/b87aaa96fd2b492bb23de7b9f9332d71?1080_1920"},{"desc":"","img":"http://oh2ucnq1s.bkt.clouddn.com/7950393902874b07942056a13e515477?1080_1920"}]
     * cutdown : {"sec":10,"min":54,"hour":11,"day":2}
     * startTime : 00:00:00
     * startDate : 2016-12-31
     * id : 7
     * buyNumber : 11
     * buyed : true
     * reserved : true
     * stars : 0
     * freeWatch : false
     * hasComment : false
     * timeWithReserve : 20
     * timeWithoutReserve : 10
     */

    private boolean isStar;
    private int _id;
    private int category;
    private String desc;
    private String livePic;
    private String liveSharePic;
    private int liveType;
    private String playUrl;
    private String price;
    private double score;
    private String startAt;
    private String stream;
    private TeacherBean teacher;
    private String title;
    private int priority;
    private String createdAt;
    private int a_watch;
    private int watch;
    private int status;
    private CutdownBean cutdown;
    private String startTime;
    private String startDate;
    private String id;
    private int buyNumber;
    private boolean buyed;
    private boolean reserved;
    private int stars;
    private boolean freeWatch;
    private boolean hasComment;
    private int timeWithReserve;
    private int timeWithoutReserve;
    private String liveUrl;
    private List<String> a_stream;
    private List<ImgDescsBean> imgDescs;
    /**
     * supplement : {"frontVideoUrl":"http://oss.kashowvr.com/videos/jiaoyu.mp4"}
     */

    private SupplementEntity supplement;


    public boolean isIsStar() {
        return isStar;
    }

    public void setIsStar(boolean isStar) {
        this.isStar = isStar;
    }

    public int get_id() {
        return _id;
    }

    public void set_id(int _id) {
        this._id = _id;
    }

    public int getCategory() {
        return category;
    }

    public void setCategory(int category) {
        this.category = category;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getLivePic() {
        return livePic;
    }

    public void setLivePic(String livePic) {
        this.livePic = livePic;
    }

    public String getLiveSharePic() {
        return liveSharePic;
    }

    public void setLiveSharePic(String liveSharePic) {
        this.liveSharePic = liveSharePic;
    }

    public int getLiveType() {
        return liveType;
    }

    public void setLiveType(int liveType) {
        this.liveType = liveType;
    }

    public String getPlayUrl() {
        return playUrl;
    }

    public void setPlayUrl(String playUrl) {
        this.playUrl = playUrl;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    public String getStartAt() {
        return startAt;
    }

    public void setStartAt(String startAt) {
        this.startAt = startAt;
    }

    public String getStream() {
        return stream;
    }

    public void setStream(String stream) {
        this.stream = stream;
    }

    public TeacherBean getTeacher() {
        return teacher;
    }

    public void setTeacher(TeacherBean teacher) {
        this.teacher = teacher;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public int getPriority() {
        return priority;
    }

    public void setPriority(int priority) {
        this.priority = priority;
    }

    public String getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(String createdAt) {
        this.createdAt = createdAt;
    }

    public int getA_watch() {
        return a_watch;
    }

    public void setA_watch(int a_watch) {
        this.a_watch = a_watch;
    }

    public int getWatch() {
        return watch;
    }

    public void setWatch(int watch) {
        this.watch = watch;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public CutdownBean getCutdown() {
        return cutdown;
    }

    public void setCutdown(CutdownBean cutdown) {
        this.cutdown = cutdown;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getStartDate() {
        return startDate;
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getBuyNumber() {
        return buyNumber;
    }

    public void setBuyNumber(int buyNumber) {
        this.buyNumber = buyNumber;
    }

    public boolean isBuyed() {
        return buyed;
    }

    public void setBuyed(boolean buyed) {
        this.buyed = buyed;
    }

    public boolean isReserved() {
        return reserved;
    }

    public void setReserved(boolean reserved) {
        this.reserved = reserved;
    }

    public int getStars() {
        return stars;
    }

    public void setStars(int stars) {
        this.stars = stars;
    }

    public boolean isFreeWatch() {
        return freeWatch;
    }

    public void setFreeWatch(boolean freeWatch) {
        this.freeWatch = freeWatch;
    }

    public boolean isHasComment() {
        return hasComment;
    }

    public void setHasComment(boolean hasComment) {
        this.hasComment = hasComment;
    }

    public int getTimeWithReserve() {
        return timeWithReserve;
    }

    public void setTimeWithReserve(int timeWithReserve) {
        this.timeWithReserve = timeWithReserve;
    }

    public int getTimeWithoutReserve() {
        return timeWithoutReserve;
    }

    public void setTimeWithoutReserve(int timeWithoutReserve) {
        this.timeWithoutReserve = timeWithoutReserve;
    }

    public List<String> getA_stream() {
        return a_stream;
    }

    public void setA_stream(List<String> a_stream) {
        this.a_stream = a_stream;
    }

    public List<ImgDescsBean> getImgDescs() {
        return imgDescs;
    }

    public void setImgDescs(List<ImgDescsBean> imgDescs) {
        this.imgDescs = imgDescs;
    }

    public String getLiveUrl() {
        return liveUrl;
    }

    public void setLiveUrl(String liveUrl) {
        this.liveUrl = liveUrl;
    }

    public void setSupplement(SupplementEntity supplement) {
        this.supplement = supplement;
    }

    public SupplementEntity getSupplement() {
        return supplement;
    }

    public static class TeacherBean {
        /**
         * follow : false
         * follows : 1
         * followers : 0
         * _id : 5
         * __v : 0
         * nickname : 李文跃
         * relation : 3
         * phone : 15822774691
         * unionid : ojmTMwFUyD5xpIMUgJE9ZyXRIr8A
         * wxUserInfo : {"openid":"oYinvs8fuzlFw-lQUaoUQdJdE0so","nickname":"李文跃","sex":1,"language":"zh_CN","city":"Hangzhou","province":"Zhejiang","country":"China","headimgurl":"http://wx.qlogo.cn/mmopen/ajNVdqHZLLCERgmTtkWEbY4Ol1mG46MJTQuVeUN2mCTXnV1CRmjU32ZGFpP8aicrSPh5j7tUmI01frFficha4FjA/0","unionid":"ojmTMwFUyD5xpIMUgJE9ZyXRIr8A","updatedAt":"2016-12-27T08:16:20.000Z","tagid_list":[]}
         * authInfo : {"intro":"","realName":"李文跃","cardNumber":"371522199008071234","cardPic1":"e_NUyLdkartvCAXwVzVg7fVRodhKGOXCXYEsMYtC1Opo4SAtSdbvQQaOw_XXmW5P","cardPic2":"hXO9UE9NKZApMv8qoRdpyI4ANzZzdQt_vEgs9-ngorBu0zMzpqqOeL2jOQIaOTCE","status":1,"updatedAt":"2016-12-27T08:22:01.842Z","createdAt":"2016-12-27T08:22:01.842Z"}
         * createdAt : 2016-12-27T08:16:32.122Z
         * isSub : true
         * sex : 0
         * balance : 0
         * score : 0
         * level : 1
         * isTeacher : true
         * stars : 0
         * grade : -1
         */

        private boolean follow;
        private int follows;
        private int followers;
        private int _id;
        private String nickname;
        private int relation;
        private String phone;
        private String unionid;
        private String headimgurl;
        private WxUserInfoBean wxUserInfo;
        private AuthInfoBean authInfo;
        private String createdAt;
        private boolean isSub;
        private int sex;
        private int balance;
        private int score;
        private int level;
        private boolean isTeacher;
        private int stars;
        private float grade;

        public boolean isFollow() {
            return follow;
        }

        public void setFollow(boolean follow) {
            this.follow = follow;
        }

        public int getFollows() {
            return follows;
        }

        public void setFollows(int follows) {
            this.follows = follows;
        }

        public int getFollowers() {
            return followers;
        }

        public void setFollowers(int followers) {
            this.followers = followers;
        }

        public int get_id() {
            return _id;
        }

        public void set_id(int _id) {
            this._id = _id;
        }


        public int getRelation() {
            return relation;
        }

        public void setRelation(int relation) {
            this.relation = relation;
        }

        public String getPhone() {
            return phone;
        }

        public void setPhone(String phone) {
            this.phone = phone;
        }

        public String getUnionid() {
            return unionid;
        }

        public void setUnionid(String unionid) {
            this.unionid = unionid;
        }

        public WxUserInfoBean getWxUserInfo() {
            return wxUserInfo;
        }

        public void setWxUserInfo(WxUserInfoBean wxUserInfo) {
            this.wxUserInfo = wxUserInfo;
        }

        public AuthInfoBean getAuthInfo() {
            return authInfo;
        }

        public void setAuthInfo(AuthInfoBean authInfo) {
            this.authInfo = authInfo;
        }

        public String getCreatedAt() {
            return createdAt;
        }

        public void setCreatedAt(String createdAt) {
            this.createdAt = createdAt;
        }

        public boolean isIsSub() {
            return isSub;
        }

        public void setIsSub(boolean isSub) {
            this.isSub = isSub;
        }

        public int getSex() {
            return sex;
        }

        public void setSex(int sex) {
            this.sex = sex;
        }

        public int getBalance() {
            return balance;
        }

        public void setBalance(int balance) {
            this.balance = balance;
        }

        public int getScore() {
            return score;
        }

        public void setScore(int score) {
            this.score = score;
        }

        public int getLevel() {
            return level;
        }

        public void setLevel(int level) {
            this.level = level;
        }

        public boolean isIsTeacher() {
            return isTeacher;
        }

        public void setIsTeacher(boolean isTeacher) {
            this.isTeacher = isTeacher;
        }

        public int getStars() {
            return stars;
        }

        public void setStars(int stars) {
            this.stars = stars;
        }

        public float getGrade() {
            return grade;
        }

        public void setGrade(float grade) {
            this.grade = grade;
        }

        public String getHeadimgurl() {
            if (TextUtils.isEmpty(headimgurl)) {
                if (wxUserInfo != null) {
                    headimgurl =  wxUserInfo.getHeadimgurl();
                }
            }
            if (TextUtils.isEmpty(headimgurl)) {
                headimgurl =  "";
            }
            return headimgurl;
        }

        public void setHeadimgurl(String headimgurl) {
            this.headimgurl = headimgurl;
        }

        public String getNickname() {
            if (TextUtils.isEmpty(nickname)) {
                if (wxUserInfo != null) {
                    nickname =  wxUserInfo.getNickname();
                }
            }
            if (TextUtils.isEmpty(nickname)) {
                nickname =  C.DEFAULT_TEACHER_NAME;
            }
            return nickname;
        }

        public void setNickname(String nickname) {
            this.nickname = nickname;
        }


        public static class WxUserInfoBean {
            /**
             * openid : oYinvs8fuzlFw-lQUaoUQdJdE0so
             * nickname : 李文跃
             * sex : 1
             * language : zh_CN
             * city : Hangzhou
             * province : Zhejiang
             * country : China
             * headimgurl : http://wx.qlogo.cn/mmopen/ajNVdqHZLLCERgmTtkWEbY4Ol1mG46MJTQuVeUN2mCTXnV1CRmjU32ZGFpP8aicrSPh5j7tUmI01frFficha4FjA/0
             * unionid : ojmTMwFUyD5xpIMUgJE9ZyXRIr8A
             * updatedAt : 2016-12-27T08:16:20.000Z
             * tagid_list : []
             */

            private String openid;
            private String nickname;
            private int sex;
            private String language;
            private String city;
            private String province;
            private String country;
            private String headimgurl;
            private String unionid;
            private String updatedAt;
            private List<String> tagid_list;

            public String getOpenid() {
                return openid;
            }

            public void setOpenid(String openid) {
                this.openid = openid;
            }

            public String getNickname() {
                return nickname;
            }

            public void setNickname(String nickname) {
                this.nickname = nickname;
            }

            public int getSex() {
                return sex;
            }

            public void setSex(int sex) {
                this.sex = sex;
            }

            public String getLanguage() {
                return language;
            }

            public void setLanguage(String language) {
                this.language = language;
            }

            public String getCity() {
                return city;
            }

            public void setCity(String city) {
                this.city = city;
            }

            public String getProvince() {
                return province;
            }

            public void setProvince(String province) {
                this.province = province;
            }

            public String getCountry() {
                return country;
            }

            public void setCountry(String country) {
                this.country = country;
            }

            public String getHeadimgurl() {
                return headimgurl;
            }

            public void setHeadimgurl(String headimgurl) {
                this.headimgurl = headimgurl;
            }

            public String getUnionid() {
                return unionid;
            }

            public void setUnionid(String unionid) {
                this.unionid = unionid;
            }

            public String getUpdatedAt() {
                return updatedAt;
            }

            public void setUpdatedAt(String updatedAt) {
                this.updatedAt = updatedAt;
            }

            public List<String> getTagid_list() {
                return tagid_list;
            }

            public void setTagid_list(List<String> tagid_list) {
                this.tagid_list = tagid_list;
            }
        }

        public static class AuthInfoBean {
            /**
             * intro :
             * realName : 李文跃
             * cardNumber : 371522199008071234
             * cardPic1 : e_NUyLdkartvCAXwVzVg7fVRodhKGOXCXYEsMYtC1Opo4SAtSdbvQQaOw_XXmW5P
             * cardPic2 : hXO9UE9NKZApMv8qoRdpyI4ANzZzdQt_vEgs9-ngorBu0zMzpqqOeL2jOQIaOTCE
             * status : 1
             * updatedAt : 2016-12-27T08:22:01.842Z
             * createdAt : 2016-12-27T08:22:01.842Z
             */

            private String intro;
            private String realName;
            private String cardNumber;
            private String cardPic1;
            private String cardPic2;
            private int status;
            private String updatedAt;
            private String createdAt;

            public String getIntro() {
                return intro;
            }

            public void setIntro(String intro) {
                this.intro = intro;
            }

            public String getRealName() {
                return realName;
            }

            public void setRealName(String realName) {
                this.realName = realName;
            }

            public String getCardNumber() {
                return cardNumber;
            }

            public void setCardNumber(String cardNumber) {
                this.cardNumber = cardNumber;
            }

            public String getCardPic1() {
                return cardPic1;
            }

            public void setCardPic1(String cardPic1) {
                this.cardPic1 = cardPic1;
            }

            public String getCardPic2() {
                return cardPic2;
            }

            public void setCardPic2(String cardPic2) {
                this.cardPic2 = cardPic2;
            }

            public int getStatus() {
                return status;
            }

            public void setStatus(int status) {
                this.status = status;
            }

            public String getUpdatedAt() {
                return updatedAt;
            }

            public void setUpdatedAt(String updatedAt) {
                this.updatedAt = updatedAt;
            }

            public String getCreatedAt() {
                return createdAt;
            }

            public void setCreatedAt(String createdAt) {
                this.createdAt = createdAt;
            }
        }
    }

    public static class CutdownBean {
        /**
         * sec : 10
         * min : 54
         * hour : 11
         * day : 2
         */

        private int sec;
        private int min;
        private int hour;
        private int day;

        public int getSec() {
            return sec;
        }

        public void setSec(int sec) {
            this.sec = sec;
        }

        public int getMin() {
            return min;
        }

        public void setMin(int min) {
            this.min = min;
        }

        public int getHour() {
            return hour;
        }

        public void setHour(int hour) {
            this.hour = hour;
        }

        public int getDay() {
            return day;
        }

        public void setDay(int day) {
            this.day = day;
        }

        public long getTime () {
            return (day * C.DAY_SECOND + hour * C.HOUR_SECOND + min * C.MINUTE_SECOND + sec) * 1000;
        }
    }

    public static class ImgDescsBean {
        /**
         * desc :
         * img : http://oh2ucnq1s.bkt.clouddn.com/f2635404a8784e60b42cc35f66742b7f?1080_1920
         */

        private String desc;
        private String img;

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }

        public String getImg() {
            return img;
        }

        public void setImg(String img) {
            this.img = img;
        }
    }

    public static class SupplementEntity {
        /**
         * frontVideoUrl : http://oss.kashowvr.com/videos/jiaoyu.mp4
         */
        private String videoUrl;
        private String frontVideoUrl;

        public void setFrontVideoUrl(String frontVideoUrl) {
            this.frontVideoUrl = frontVideoUrl;
        }

        public String getFrontVideoUrl() {
            return frontVideoUrl;
        }

        public String getVideoUrl() {
            return videoUrl;
        }

        public void setVideoUrl(String videoUrl) {
            this.videoUrl = videoUrl;
        }
    }
}
